package com.zhongfl.crm.lixiao.mapper;

import com.zhongfl.crm.model.boss.OrderCapitalDetail;
import com.zhongfl.crm.model.boss.OrderCapitalDetailQuery;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface OrderCapitalDetailMapper {

    int insertSelective(OrderCapitalDetail record);

    OrderCapitalDetail selectByPrimaryKey(Integer id);

    List<OrderCapitalDetail> selectByQuery(OrderCapitalDetailQuery query);

    OrderCapitalDetail selectByTradeNo(String tradeNo);

    List<OrderCapitalDetail> selectByOrderNo(String orderNo);

    int writeOffByTradeNo(OrderCapitalDetail orderCapitalDetail);


    int updateByTradeNoSelective(OrderCapitalDetail record);

    int deleteByTradeNo(@Param("tradeNo") String tradeNo, @Param("name") String name);

    BigDecimal selectIncomeTotalByOrderNo(String orderNo);

    BigDecimal selectOutcomeTotalByOrderNo(String orderNo);

    BigDecimal selectRefundTotalByOrderNo(String orderNo);
}